package com.pojo.order.feign;

import com.pojo.order.entity.Payment;
import com.pojo.order.entity.Reservation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * 申明这是一个Feign客户端，并且指明服务id
 *
 * @author Evan
 */
@FeignClient(value = "app-payment")
public interface PaymentFeignClient {

    @RequestMapping(value = "/payment/queryPaymentByUserId/{id}", method = RequestMethod.GET)
    Map<Long, Payment> queryPaymentByUserId(@PathVariable("id") Long id);


    @RequestMapping(value = "/payment/payTicket/{userId}/{t_id}", method = RequestMethod.GET)
    String payTicket(@PathVariable("userId") Long userId, @PathVariable("t_id") Long t_id);


    @RequestMapping(value = "/payment/cancelPayment/{userId}/{t_id}", method = RequestMethod.GET)
    String cancelPayment(@PathVariable("userId") Long userId, @PathVariable("t_id") Long t_id);


}

